
* Formatting
graph set window fontface "Times New Roman"	// use Times New Roman as the default font for Graph window
// 	 graph set window fontface default 			// use this to restore to factury setting if preferred later

set scheme s1mono


****************************************
*************** Figure 2 ***************

use "${ddata}cleaned_data_wACSweight.dta", clear 

gen z=0 if male==0
replace z=80 if male==1

sum qs2_0 if control==0  [aw=weight_ACS]
local cmean0 = r(mean)
sum qs2_3 if control==0  [aw=weight_ACS]
local cmean3 = r(mean)

#delimit;
binscatter qs2_0  so_mother_time_off_0  if control==1 [aw=weight_ACS],  color(black)
xline(`cmean0', lcolor(gs4) lpattern(shortdash_dot) ) 
xtitle("Second order beliefs for same gender and state", size(small)) 
ytitle("First order beliefs", size(small)) nquantiles(30) 
title("A. Mother reject offer", size(12pt)) ;
graph addplot lfit z z, lpattern (dash) lcolor(gs11) ;
graph save "${o}figure1_a", replace ;


binscatter qs2_3 so_mother_time_off_3   if control==1 [aw=weight_ACS],  color(black)  
xline(`cmean3', lcolor(gs4) lpattern(shortdash_dot) ) 
xtitle("Second order beliefs for same gender and state", size(small)) 
ytitle("First order beliefs", size(small)) nquantiles(30) 
title("B. Mother time off, earns 15% more", size(12pt)) ;
graph addplot lfit z z, lpattern (dash) lcolor(gs11) ;
graph save "${o}figure1_b", replace ;

gr combine "${o}figure1_a.gph" "${o}figure1_b.gph" ;
graph export "${o}fo_vs_so.pdf", replace ;

#delimit cr

erase "${o}figure1_a.gph"
erase "${o}figure1_b.gph"
